package com.ynet.middleground.user.bean;

import com.ynet.core.common.BaseReqObj;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @description: 证书管理证书更新并下载请求对象
 * @author: Wangxz
 * @create: 2019-11-08 14:10
 **/
@Data
@ApiModel(value = "证书管理证书更新并下载请求对象", description = "证书管理证书更新并下载请求对象")
public class UpdateDownloadCertReq extends BaseReqObj {
    private static final long serialVersionUID = 6138325834341896053L;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id", notes = "用户id", dataType = "Integer")
    private Integer userId;

    /**
     * 编号
     */
    @ApiModelProperty(value = "uKey编号", notes = "uKey编号", dataType = "String")
    private String ukeyId;

    @ApiModelProperty(value = "dn号,(若上传userid或uKey编号则不需上传该字段)", notes = "dn号", dataType = "String")
    private String dn;

    /**
     * 申请书
     */
    @ApiModelProperty(value = "申请书(RSA算法生成2048位)", notes = "申请书(RSA算法生成2048位)", dataType = "String", required = true)
    @NotEmpty(message = "申请书不能为空！")
    private String p10;

    /**
     * 默认CA证书有效期
     */
    @ApiModelProperty(value = "默认CA证书有效期,默认单位月", notes = "默认CA证书有效期,默认单位月", dataType = "String",required = true)
    @NotEmpty(message = "默认CA证书有效期不能为空！")
    private String duration;
}
